package pl.kosmowska.ewelina.client.app.requestfactory;

import java.util.Date;
import java.util.List;

import pl.kosmowska.ewelina.client.app.requestfactory.dto.OutcomeDataProxy;
import pl.kosmowska.ewelina.server.dao.OutcomeDataDAO;
import pl.kosmowska.ewelina.server.locators.EntityServiceLocator;

import com.google.web.bindery.requestfactory.shared.Request;
import com.google.web.bindery.requestfactory.shared.RequestContext;
import com.google.web.bindery.requestfactory.shared.Service;

@Service(value = OutcomeDataDAO.class, locator = EntityServiceLocator.class)
public interface OutcomeDataRequest extends RequestContext {

  Request<OutcomeDataProxy> findOutcomeData(String id);
  
  Request<List<OutcomeDataProxy>> findOutcomeDataByUser(Date date);
  
  Request<List<OutcomeDataProxy>> findOutcomeDataByUser(boolean isOutcome, Date date);
  
  Request<List<OutcomeDataProxy>> findOutcomeDataByUserBetweenDates(boolean isOutcome, Date startDate, Date endDate);
  
  Request<List<OutcomeDataProxy>> findOutcomeDataByUserBetweenDates(Date startDate, Date endDate);
  
  Request<List <OutcomeDataProxy>> getSavingsOutcomeList(String id);
  
  Request<OutcomeDataProxy> persist(OutcomeDataProxy outcomeDataProxy);
  
  Request<List <OutcomeDataProxy>> persistAllRepeatedOutcome(List <OutcomeDataProxy> outcomeDataList);
  
  Request<List <OutcomeDataProxy>> persistAll(List <OutcomeDataProxy> outcomeDataList);

  Request<List<OutcomeDataProxy>> persistAllSavings(List<OutcomeDataProxy> outcomeDataList);

  Request<List<OutcomeDataProxy>> editRepeatedOutcomeData(String groupId , List <OutcomeDataProxy> newList, Date date);
  
  Request<List<OutcomeDataProxy>> editRepeatedOutcomeData(String groupId , List <OutcomeDataProxy> newList);
  
  Request<Boolean> deleteById(String id);
  
  Request <List<OutcomeDataProxy>> deleteRepeatedOutcomeData(String groupId, Date date);
  
  Request <Boolean> deleteSponsoredOutcome(String id);

  Request<Float> getSum(Date date) ; 

  
}
